package com.yunhoo.checkFlow.bean;

import com.ibatis.dao.client.DaoManager;
import com.yunhoo.checkFlow.db.dao.FlowInfoDao;
import com.yunhoo.checkFlow.model.FlowInfo;
import com.yunhoo.sys.db.config.DaoConfig;
import java.io.Serializable;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name = "showFlowInfoBean")
@SessionScoped
public class ShowFlowInfoBean implements Serializable {

    private final DaoManager daom;
    private final FlowInfoDao dao;
    private List<FlowInfo> infoli = null;

    public ShowFlowInfoBean() {
        daom = DaoConfig.getDaoManager();
        dao = (FlowInfoDao) daom.getDao(FlowInfoDao.class);
    }

    public void showFlowInfo(String number, String billType) {
        FlowInfo param = new FlowInfo(true);
        param.setNumber(number);
        param.setType(billType);
        infoli = dao.queryFlowInfoByNumberAndType(param);
    }

    public List<FlowInfo> getInfoli() {
        return infoli;
    }

    public void setInfoli(List<FlowInfo> infoli) {
        this.infoli = infoli;
    }
}
